Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit alters the behavior of the Read::read_to_end() method to zero all
memory instead of passing an uninitialized buffer to read. This change is
motivated by the discussion on the internals forum where the
conclusion has been that the standard library will not expose uninitialized
memory.

Closes #20314

This commit alters the behavior of the `Read::read_to_end()` method to zero all
memory instead of passing an uninitialized buffer to `read`. This change is
motivated by the [discussion on the internals forum][discuss] where the
conclusion has been that the standard library will not expose uninitialized
memory.

[discuss]: http://internals.rust-lang.org/t/uninitialized-memory/1652

Closes rust-lang#20314
@rust-highfive
Copy link
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@aturon
Copy link
Contributor

aturon commented Mar 24, 2015

@bors: r+ 4ccf374

cc @nikomatsakis

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 24, 2015
This commit alters the behavior of the `Read::read_to_end()` method to zero all
memory instead of passing an uninitialized buffer to `read`. This change is
motivated by the [discussion on the internals forum][discuss] where the
conclusion has been that the standard library will not expose uninitialized
memory.

[discuss]: http://internals.rust-lang.org/t/uninitialized-memory/1652

Closes rust-lang#20314
@bors bors merged commit 4ccf374 into rust-lang:master Mar 25, 2015
@alexcrichton alexcrichton deleted the io-zero branch March 27, 2015 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safe methods in std::io allow reading uninit memory

4 participants